package org.jeecg.modules.identifyRecord.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.identifyRecord.entity.IdentifyRecord;
import org.jeecg.modules.identifyRecord.mapper.IdentifyRecordMapper;
import org.jeecg.modules.identifyRecord.service.IIdentifyRecordService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: ocr识别记录
 * @Author: jeecg-boot
 * @Date:   2025-03-20
 * @Version: V1.0
 */
@Service
public class IdentifyRecordServiceImpl extends ServiceImpl<IdentifyRecordMapper, IdentifyRecord> implements IIdentifyRecordService {

    @Override
    public void removeByTankerId(String id) {
        LambdaQueryWrapper<IdentifyRecord> wrapper = Wrappers.lambdaQuery();
        wrapper.eq(IdentifyRecord::getTankerId, id);
        this.remove(wrapper);
    }

    @Override
    public List<IdentifyRecord> getByTankerId(String id) {
        LambdaQueryWrapper<IdentifyRecord> wrapper = Wrappers.lambdaQuery();
        wrapper.eq(IdentifyRecord::getTankerId, id);
        return this.list(wrapper);
    }

}
